﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project2
{
    public class Circle : shape
    {
        int pi = 3;
        int radius;
        new int area;

        public Circle(int i)
        {
            radius = i;
            if (isshape())
            {
                setarea();
            }
            else
            {
                area = 0;
            }
        }
        public override int getarea()
        {
            return area;
        }
        public override void setarea()
        {
            area = radius*radius*pi;
        }
        public override bool isshape()
        {
            if (radius>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
